package com.mrd.gtimp.business.entity;

import com.mrd.gtimp.base.entity.Company;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity(name = "T_BIZ_FUND_REPORT")
public class FundReport implements Serializable {
	private static final long	serialVersionUID	= 1L;
	/**
	 * id
	 */
	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name = "ID")
	private String	          id;

	/**
	 * 数据所属公司
	 */
	@ManyToOne
	@JoinColumn(updatable = false, name = "COM_ID")
	private Company	          owner;
	/**
	 * 上次统计结余（元）
	 */
	@Column(updatable = false, name = "PRE_BALANCE")
	private double	          preBalance;
	/**
	 * 本次统计结余(元)
	 */
	@Column(updatable = false, name = "BALANCE")
	private double	          balance;

	/**
	 * 本期收入总额(元)
	 */
	@Column(updatable = false, name = "INCOME")
	private double	          income;

	/**
	 * 本期支出总额(元)
	 */
	@Column(updatable = false, name = "COST")
	private double	          cost;
	/**
	 * 备注
	 */
	@Column(name = "REMARK")
	private String	          remark;

	/**
	 * 上次统计时间
	 */
	@Column(name = "PRE_REG_DATE", updatable = false)
	private Date	          preRegDate;

	/**
	 * 本次统计时间
	 */
	@Column(name = "REG_DATE", updatable = false)
	private Date	          regDate;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Company getOwner() {
		return owner;
	}

	public void setOwner(Company owner) {
		this.owner = owner;
	}

	public double getPreBalance() {
		return preBalance;
	}

	public void setPreBalance(double preBalance) {
		this.preBalance = preBalance;
	}

	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}

	public double getIncome() {
		return income;
	}

	public void setIncome(double income) {
		this.income = income;
	}

	public double getCost() {
		return cost;
	}

	public void setCost(double cost) {
		this.cost = cost;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getPreRegDate() {
		return preRegDate;
	}

	public void setPreRegDate(Date preRegDate) {
		this.preRegDate = preRegDate;
	}

	public Date getRegDate() {
		return regDate;
	}

	public void setRegDate(Date regDate) {
		this.regDate = regDate;
	}

	@Override
	public String toString() {
		return "FundReport [id=" + id + ", owner=" + owner + ", preBalance=" + preBalance
		        + ", balance=" + balance + ", income=" + income + ", cost=" + cost + ", remark="
		        + remark + ", preRegDate=" + preRegDate + ", regDate=" + regDate + "]";
	}

}
